#ifndef AIDIALOG_H
#define AIDIALOG_H

#include <QDialog>
#include <QPoint>
#include <QTimer>
#include <QLabel>
#include <QPainter>
#include <QWidget>
#include <QPixmap>
#include <QBitmap>
#include <QTextBrowser>
#include <QLabel>
#include <QAudioRecorder>


/**
 * @brief The AiDialog class
 * AI麒麟百事通
 * 使用自定义的dialog来实现
 */


class AiDialog : public QDialog {
    Q_OBJECT

public:
    AiDialog(QWidget* parent = nullptr);

    void showQuestion(QString text);

    void showAnswer(QString text);

    QString getText();

    ~AiDialog();

protected:
    bool eventFilter(QObject *obj, QEvent *event) override;
    void mousePressEvent(QMouseEvent *event) override;
    void mouseMoveEvent(QMouseEvent *event) override;
    void mouseDoubleClickEvent(QMouseEvent* event) override;

private slots:

signals:
    void labelClicked();

    void labelReleased();

    void labelHover();

private:
    void setupUI();
    QLabel* label;
    QPoint lastMousePosition;
    QLabel* labelQ;
    QTextBrowser* labelA;
    QAudioRecorder *recorder;
};



#endif // AIDIALOG_H
